home *** CD-ROM | disk | FTP | other *** search
- /*
- sp_main.c - main program
- */
-
- #include "sp.h"
- #include "sc_seer_globals.h"
- #include <deskmgr.h>
-
- /*this isn't really a routine, the address of the seer data is stored
- (patched into) here when seer starts up
-
- Furthermore, in the program (not the da) this doesn't do anything
- usefull since a4 isn't the global register.
- */
- void real_sr_a4()
- {asm {
- dc.l 0 /*0 means that the storage isn't setup yet*/
- }
- };
-
- void load_global_rtn()
- {
- }
-
- void main(void);
- void main()
- {init_globals(); /*globals with values common to prog and DA */
- gl.res_base=128; /*our resources of each type start here*/
- gl.win_ref_num=8; /*set the kind field of program windows*/
-
- if(setjmp(gl.seer_exit_lngjmp)!=0) /*set a place to throw errors*/
- ExitToShell(); /*quit the program*/
-
- init_mac(); /*do one time mac initilization*/
- init_windef();
- open_seer(); /*open the seer device*/
- load_seer(); /*match version*/
- configure_seer(); /*setup seers queues*/
-
- pdl_opn_res(); /*read in the pdl definition*/
-
- st_new_windef(); /*make the status display window*/
- sk_new_windef(); /*make a new scope window*/
- pk_new_windef(); /*make the seer display window*/
-
- CloseDriver(-41);
- CloseDriver(-40);
- CloseDriver(-10);
- CloseDriver(-9); /*close the driver*/
- seer_on(); /*start data collection*/
-
- event_loop(); /*run the program till it wants to quit*/
-
- close_seer(); /*close the seer device, bomb if we can't*/
- }
-